import request from '@/utils/request'

// 查询订单列表
export function listPayOrder(query) {
  return request({
    url: '/system/sett/list',
    method: 'get',
    params: query
  })
}

// 查询订单详细
export function getPayOrder(orderId) {
  return request({
    url: '/system/sett/' + orderId,
    method: 'get'
  })
}

// 新增订单
export function addPayOrder(data) {
  return request({
    url: '/system/sett/createLink',
    method: 'post',
    loading: true,
    data: data
  })
}

// 重置订单状态
export function updateStatus(data) {
  return request({
    url: '/system/sett/updateStatus',
    method: 'post',
    data: data
  })
}

// 删除订单
export function delPayOrder(orderId) {
  return request({
    url: '/system/sett/' + orderId,
    method: 'delete'
  })
}

// 获取订单扩展信息
export function getOrderExInfo(data) {
  return request({
    url: '/system/sett/getOrderExInfo',
    method: 'post',
    params: data
  })
}

// 获取订单日志信息
export function getOrderLog(data) {
  return request({
    url: '/system/sett/getOrderLog',
    method: 'post',
    params: data
  })
}

// 获取24小时内商户收款数量
export function get24MoneyByClient(data) {
  return request({
    url: '/system/sett/get24MoneyByClient',
    method: 'post',
    params: data
  })
}

// 获取24小时内收款账号收款数量
export function get24MoneyByAccount(data) {
  return request({
    url: '/system/sett/get24MoneyByAccount',
    method: 'post',
    params: data
  })
}

// 发起退款
export function orderRefund(data) {
  return request({
    url: '/system/sett/orderRefund',
    method: 'post',
    loading: true,
    params: data
  })
}

// 状态图表数据
export function getStatusChart(data) {
  return request({
    url: '/system/sett/getStatusChart',
    method: 'post',
    data: data
  })
}

// 近七天数量金额图表数据
export function getSevenChart(data) {
  return request({
    url: '/system/sett/getSevenChart',
    method: 'post',
    data: data
  })
}

// 获取订单总数
export function getOrderNum(data) {
  return request({
    url: '/system/sett/getOrderNum',
    method: 'post',
    data: data
  })
}

// 获取订单成功率图表
export function getOrderSuccessRate(data) {
  return request({
    url: '/system/sett/getOrderSuccessRate',
    method: 'post',
    data: data
  })
}

// 获取排行榜列表
export function getOrderRanking(data) {
  return request({
    url: '/system/sett/getOrderRanking',
    method: 'post',
    data: data
  })
}

// 设为未结算
export function setUnSett(data) {
  return request({
    url: '/system/sett/setUnSett',
    method: 'post',
    data: data
  })
}

// 全部结算
export function setAllSett(data) {
  return request({
    url: '/system/sett/setAllSett',
    method: 'post',
    data: data
  })
}

// 查询未结算订单金额、数量
export function getUnSettToTal(data) {
  return request({
    url: '/system/sett/getUnSettToTal',
    method: 'post',
    data: data
  })
}

// 查询未结算订单列表
export function getUnSettList(data) {
  return request({
    url: "/system/sett/getUnSettList",
    method: "post",
    data: data,
  });
}

// 查询一个月的未结算订单数量
export function getUnSettNum(data) {
  return request({
    url: "/system/sett/getUnSettNum",
    method: "post",
    data: data,
  });
}

